home *** CD-ROM | disk | FTP | other *** search
- if(kicked == "0")
- {
- score = "0";
- }
- score += "1";
- if(bestscore < score)
- {
- bestscore = score;
- }
- kicked = "1";
- t += "0.1";
- oldx = x;
- oldy = y;
- x = getProperty("Ball", _X);
- y = getProperty("Ball", _Y);
- vx = (getProperty("Ball", _X) - getProperty("mouse", _X)) * "10" + (random("3") / "10" - "0.15");
- vy = - "125" + (y - getProperty("mouse", _Y));
- dx = getProperty("Ball", _X) - getProperty("mouse", _X);
- if("0" < dx)
- {
- vy += dx;
- }
- else if(dx < "0")
- {
- vy -= dx;
- }
- if(y < BallRadius)
- {
- y = BallRadius;
- vx *= elastic;
- vy = - vy * elastic;
- }
- if("300" - BallRadius < y)
- {
- y = "300" - BallRadius;
- vx *= elastic;
- vy = - vy * elastic;
- }
- if(x < BallRadius)
- {
- x = BallRadius;
- vx = - vx * elastic;
- vy *= elastic;
- }
- if("400" - BallRadius < x)
- {
- x = "400" - BallRadius;
- vx = - vx * elastic;
- vy *= elastic;
- }
- setProperty("Ball", _X, x);
- setProperty("Ball", _Y, y);
- setProperty("Ball", _rotation, x);
- setProperty("Ball", _xscale, "100");
- setProperty("Ball", _yscale, "100");
- gotoAndPlay(2);
-